package com.example.app.api;

import com.example.app.entity.EndOrderRequest;
import com.example.app.entity.RegisterRequest;
import com.example.app.entity.Reservation;
import com.example.app.entity.ReservationInfoRequest;
import com.example.app.entity.ReservationInfoResponse;
import com.example.app.entity.UploadResponse;

import java.util.List;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

public interface UploadService {
    @Multipart
    @POST("api/upload/image") // 替换为实际的上传路径
    Call<UploadResponse> uploadImage(
            @Part MultipartBody.Part image,
            @Part("description") RequestBody description
    );

    @POST("api/reservation")
    Call<ReservationInfoResponse> reservation(@Body ReservationInfoRequest request);

    @GET("api/getAllReservationId")
    Call<ResponseBody> getAllReservationId(@Query("userId") String userId);

    @GET("api/getLastReservation")
    Call<ReservationInfoResponse> getLastReservation(@Query("userId") String userId);

    @GET("api/getAllReservation")
    Call<List<Reservation>> getAllReservation(@Query("userId") String userId);

    @POST("api/saveParkIdandPrice")
    Call<Void> endOrder(@Body EndOrderRequest request);
}